﻿@using AC.Code.Config
@using AC.Util

@{
    ViewBag.Title = "代码模板设置";
    Layout = "../Shared/_Layout.cshtml";
}

<div class="row">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-content ibox-heading">
                <h3>代码模板设计</h3>
                <small><i class="fa fa-map-marker"></i> 有待提高,不断改进中.</small>
            </div>
            <div class="ibox-content">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#tabNameRules" data-toggle="tab">NameRules</a></li>
                    <li><a href="#test" data-toggle="tab">变量设置</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="tabNameRules">
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>语言选择</label>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="codeLanguage" value="1" checked="checked">C#
                                        </label>
                                        <label>
                                            <input type="radio" name="codeLanguage" value="2">Java
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group" id="positionGroup">
                                    <label>Entity Kinds</label>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-top-right" checked="">Top Right
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-bottom-right">Bottom Right
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-bottom-left">Bottom Left
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-top-left">Top Left
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-top-full-width">Top Full Width
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-bottom-full-width">Bottom Full Width
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-top-center">Top Center
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="positions" value="toast-bottom-center">Bottom Center
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label class="control-label">当前规则：</label>
                                    <p class="form-control-static inline text-danger">UpperCamelCase</p>
                                </div>
                                <div class="form-group">
                                    <label class="control-label">Name Prefix</label>
                                    <input type="text" value="" />
                                </div>
                                <div class="form-group">
                                    <label class="control-label">Name Suffix</label>
                                    <input type="text" value="" />
                                </div>
                                <div class="form-group">
                                    <label class="control-label">Name Styles</label>
                                    @{
                                        IList<KeyValuePair<string, string>> nameStyles = EnumUtils.GetEnumDescriptions(typeof (NameStyle));
                                        foreach (var namestyle in nameStyles)
                                        {
                                            <div class="radio">
                                                <label>
                                                    <input type="radio" name="namestyles" value="@namestyle.Key" />@namestyle.Value
                                                </label>
                                            </div>
                                        }
                                    }
                                </div>
                                <div class="form-group">
                                    <button class="btn btn-primary">保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="test">
                        <div class="m-t-xs well well-sm">
                            <a class="btn btn-primary">添加变量</a>
                            <a class="btn btn-primary">添加变量</a>
                            <a class="btn btn-primary">添加变量</a>
                        </div>
                        @*<table class="table table-bordered">
                            <tr>
                                <td>
                                    <a class="btn btn-primary">添加变量</a>
                                    <a class="btn btn-primary">修改变量</a>
                                    <a class="btn btn-primary">删除变量</a>
                                    <a class="divider"></a>
                                    <a class="btn btn-primary">test</a>
                                </td>
                            </tr>
                        </table>*@
                        <table class="table table-condensed table-striped">
                            <tr>
                                <th>变量名</th>
                                <th>描述</th>
                            </tr>
                            <tr>
                                <td><code>${DtoClassName}</code></td>
                                <td>test</td>
                            </tr>
                            <tr>
                                <td><code>${DtoClassName}</code></td>
                                <td>test</td>
                            </tr>
                            <tr>
                                <td><code>${DtoClassName}</code></td>
                                <td>test</td>
                            </tr>
                            <tr>
                                <td><code>${DtoClassName}</code></td>
                                <td>test</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>